package com.leunpha.mini.utils;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import java.io.IOException;
import java.util.Properties;

/**
 * User: leunpha
 * Date: 14-5-11
 * Time: 下午8:58
 */
public class PropertiesUtils {
    private static Properties properties = new Properties();
    private static Log log = LogFactory.getLog(PropertiesUtils.class);

    public static Properties getProperties(String name){
        try {
            properties.load(ClassUtils.getResourceAsStream(name));
        } catch (IOException e) {
            log.error("load properties error:"+e);
        }
        return properties;
    }
}
